//
//  CustomView.m
//  RNOCMutuallyDemo
//
//  Created by Harvey on 2017/7/17.
//  Copyright © 2017年 Facebook. All rights reserved.
//

#import "CustomView.h"

@interface CustomView ()

@end

@implementation CustomView {
  UILabel *_titleLabel;
  UILabel *_contentLabel;
}

- (instancetype)init
  {
    self = [super init];
    if (self) {
      [self configUI];
    }
    return self;
  }
  
- (void)configUI {
  _titleLabel = [[UILabel alloc] init];
  _titleLabel.textAlignment = NSTextAlignmentCenter;
  _contentLabel = [UILabel new];
  _contentLabel.textAlignment = NSTextAlignmentCenter;
  [self addSubview:_titleLabel];
  [self addSubview:_contentLabel];

}
  


- (void)layoutSubviews {
  [super layoutSubviews];
  _titleLabel.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height / 2);
  _contentLabel.frame = CGRectMake(0, self.frame.size.height/2, self.frame.size.width, self.frame.size.height / 2);

}

  
- (void)setTitleString:(NSString *)titleString {
  _titleString = titleString;
  _titleLabel.text = titleString;
}
  
- (void)setContentString:(NSString *)contentString {
  _contentString = contentString;
  _contentLabel.text = contentString;
}

@end
